home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Concordia.h
-
- Contains:
-
- Written by:
-
- Copyright: Copyright © 1991-1999 by Apple Computer, Inc., All Rights Reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
- 8/10/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1
-
-
- */
- #ifndef _concordia_
- #define _concordia_
- /******************************************************************************\
- * Header Files
- \******************************************************************************/
-
- #ifndef __QUICKDRAW__
- #include <Quickdraw.h>
- #endif
-
-
- /******************************************************************************\
- * Constants and Macros
- \******************************************************************************/
-
- #define null 0 //Generic null
- #define cmmdCharCode ((char) 0x11) //ASCII code of command character
-
- /* Find length of a Pascal string in bytes */
- #define strSize(StrPtr) ((int)StrPtr[0]+1)
-
- /* System Globals */
- #define sgTopMenuItem *((short *) 0x0A0A)
- #define sgAtMenuBottom *((short *) 0x0A0C)
- #define sgMBSaveLoc *((Handle *) 0xB5C) //I guess MBDF 0 stores a handle here
-
-
- /******************************************************************************\
- * Type Declarations
- \******************************************************************************/
-
- typedef struct
- {
- char privates [76];
- long randSeed;
- BitMap screenBits;
- Cursor arrow;
- Pattern dkGray;
- Pattern ltGray;
- Pattern gray;
- Pattern black;
- Pattern white;
- GrafPtr thePort;
- } QDGlobal;
-
- /* Pointer to Quickdraw Globals */
- #define qdGlobPtr ((QDGlobal *) (**((GrafPtr ***) CurrentA5) + 1) - 1)
-
- /* Text state */
- typedef struct
- {
- short txFace; //Typeface
- Style txStyle; //Typestyle
- short txMode; //How is text drawn?
- short txSize; //Typesize
- } TextStateRec;
-
- /* Menu information for one menu item (except for item string) */
- typedef struct
- {
- Byte iconNum; //Icon resource ID
- char kbdEquiv; //Keyboard menu equivalent
- char markChar; //Character mark
- Style charStyle; //Item's character style
- } ItemInfoRec, *ItemInfoPtr;
-
-
- /******************************************************************************\
- * Function Prototypes
- \******************************************************************************/
-
- void GetTextState (TextStateRec *);
- void SetTextState (TextStateRec *);
-
-
- #endif
-